package com.learn.mybatis.dao;

import com.learn.mybatis.model.Course;
import com.learn.mybatis.model.Student;
import com.learn.mybatis.model.StudentCourseLink;

import java.util.List;

/**
 * @author wangxing
 * @date 2020/4/30.
 */
public interface StudentMapper {
    /*
     * 查询所有学生及他们的选择课程的信息
     * @return
     * @throws Exception
     */
    public List<Student> selectAllStudentCourse() throws Exception;

    /**
     * 根据学生id查询学生对象
     *
     * @param id
     * @return
     * @throws Exception
     */
    public Student selectStudentById(Integer id) throws Exception;

    /*
     * 查询某个学生选择的课程的信息
     * @return
     * @throws Exception
     */
    public List<Course> selectStudentCourse(Student student) throws Exception;

    /*
     * 删除指定 id 用户的某门课（根据课程 id）的选课情况
     * @param StudentCourseLink
     * @throws Exception
     */
    public void deleteStudentCourseById(StudentCourseLink scLink) throws Exception;
}
